<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <script type="text/javascript">
        var getId = function(id){
            return '我是'+id
        }
        $(function(){
            var map1 = {id:1,name:"张三", isRed:true, isShow:true};
            var map2 = {id:2,name:"李四", isRed:false, isShow:false};
            var map3 = {id:3,name:"王五", isRed:false, isShow:true};
            var map4 = {id:4,name:"小罗", isRed:true, isShow:true};
            var list = [map1, map2,map3, map4];

            $.setData({"prod1":list});
        })
    </script>
</head>
<body>

<table>

    <a href="?_=list&urlPath=/recite/user/page&gradeId=1" data-go="navigate">分页示例</a>

    <tr>
        <th>序号</th>
        <th>ID</th>
        <th>姓名</th>
        <th></th>
    </tr>
    <tr data-for="{d, i : prod1}" data-style="color: {d.isRed?'red':''}" data-if="{d.isShow}">
        <td data-text="{i+1}"></td>
        <td data-text="$.getId({d.id})"></td>
        <td data-text="{d.name}" data-onclick="aa({i})"></td>
        <td>
            <a data-go="navigate" data-href="?_=detail&id={d.id}">详情</a>
        </td>
    </tr>
</table>


</body>
</html>